#include <cstdio>
#include <cstring>
#include <iostream>
#include <algorithm>
using namespace std;
int main()
{
	int a[110];
	int n;
	int sum = 0;
	scanf("%d",&n);
	for(int i = 0;i<n;i++) 
	{
		scanf("%d",&a[i]);
		sum += a[i];
	}
	sort(a,a+n);
	int ans = 0;
	int cnt = 0;
	for(int i = n-1;ans<=sum/2;i--)
	{
		ans += a[i];
		cnt++;
	}
	printf("%d\n",cnt);
}
